<ion-view class="bg">
  <ion-header-bar class="bar bar-positive">
    <button class="button back-button buttons icon ion-ios-arrow-left button-clear" nav-direction="back" ui-sref="tab.workbench">返回</button>
    <h3 class="title">异常管理</h3>
    <button class="button button-icon icon ion-ios-upload-outline" ui-sref="abnl_search"></button>
  </ion-header-bar>
  <ion-content>
    <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
    <div ng-if="showloading" class="ion-spinner">
      <ion-spinner icon="lines" class="spinner-calm"></ion-spinner>
    </div>
    <ion-list class="myList" ng-if="showloading == false">
      <h5 ng-if="abnormalData==''" class="notFound">未找到数据</h5>
      <li class="item li" ng-click="goAbnormalDetail(data,data.WAYBILL_ID)" ng-repeat="data in abnormalData">
        <div>
          <i>承运单号</i>
          <i class="value" style="color: #11c1f3">{{data.WAYBILL_NO}}</i>
        </div>
        <div>
          <i>承运日期</i>
          <i class="value">{{data.CREATE_DATE | date : "yyyy-MM-dd HH:mm:ss"}}</i>
        </div>
        <div>
          <i>异常状态</i>
          <i class="value" ng-if="data.ABNORMAL_STATUS=='0'">待处理</i>
          <i class="value" ng-if="data.ABNORMAL_STATUS=='1'">待审核</i>
          <i class="value" ng-if="data.ABNORMAL_STATUS=='2'">未通过</i>
          <i class="value" ng-if="data.ABNORMAL_STATUS=='3'">已通过</i>
        </div>
        <div>
          <i>货物名称</i>
          <i class="value">{{data.GOODS_NAMES}}</i>
        </div>
        <div>
          <i>异常类型</i>
          <i class="value" ng-if="data.CARGO_TYPE=='0'">货多</i>
          <i class="value" ng-if="data.CARGO_TYPE=='1'">货少</i>
          <i class="value" ng-if="data.CARGO_TYPE=='2'">货损</i>
          <i class="value" ng-if="data.CARGO_TYPE=='3'">货少且货损</i>
        </div>
        <div>
          <i>异常件数</i>
          <i class="value">{{data.CARGO_NUMBER}}</i>
        </div>
      </li>
    </ion-list>
    <ion-infinite-scroll on-infinite="loadMore()" distance="1%" ng-if="hasNextPage()"></ion-infinite-scroll>
  </ion-content>
</ion-view>
